package com.giveu.signature.bean;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import lombok.Data;

@Data
@JsonInclude(value=Include.NON_NULL)
public class HtmlTemplate {
	
	private CssStyle title;
	
	private List<CssStyle> sectionList;
	
	@Data
	@JsonInclude(value=Include.NON_NULL)
	public static class CssStyle {
		private String text;
		private float font_size = 12.5F;
		private float text_indent = 25;//24
		private String text_align = "left";
		private float margin_top = 5;//6
		private float margin_right;
		
		public CssStyle setTitle() {
			this.font_size = 16;
			this.text_indent = 0;
			this.text_align = "center";
			this.margin_top = 0;
			return this;
		}

		public CssStyle(String text) {
			this.text = text;
		}

		public CssStyle(String text, float font_size, float text_indent, String text_align, float margin_top,
				float margin_right) {
			this.text = text;
			this.font_size = font_size;
			this.text_indent = text_indent;
			this.text_align = text_align;
			this.margin_top = margin_top;
			this.margin_right = margin_right;
		}
		
		public CssStyle(String text, String text_align, float margin_top,float margin_right) {
			this.text = text;
			this.text_align = text_align;
			this.margin_top = margin_top;
			this.margin_right = margin_right;
		}
		
		public CssStyle(String text, String text_align, float margin_right) {
			this.text = text;
			this.text_align = text_align;
			this.margin_right = margin_right;
		}
		
		public CssStyle(String text, String text_align) {
			this.text = text;
			this.text_align = text_align;
		}
		
		public CssStyle(String text, float font_size) {
			this.text = text;
			this.font_size = font_size;
		}
	}
	
}
